<?php
namespace app\common\system\logic;

use app\common\BaseLogic;

class AuthRoleLogic extends BaseLogic {
    public function getRole($id) {
        $model = new \app\common\system\model\AuthRole();
        $row = $model->where('id', $id)->find();

        return $row;
    }

    public function getRoles($ids, $isArray=true) {
        $where = [];
        $where[] = ['id', 'in', $ids];
        $model = new \app\common\system\model\AuthRole();
        $rows = $model->where($where)->select();

        return $isArray ? $rows->toArray() : $rows;
    }
}